home *** CD-ROM | disk | FTP | other *** search
- '------------------------------------------------------------------------------
- ' <autogenerated>
- ' This code was generated by a tool.
- ' Runtime Version: 1.0.2914.16
- '
- ' Changes to this file may cause incorrect behavior and will be lost if
- ' the code is regenerated.
- ' </autogenerated>
- '------------------------------------------------------------------------------
-
- Option Strict Off
- Option Explicit On
-
- Imports System
- Imports System.Data
- Imports System.Runtime.Serialization
- Imports System.Xml
-
-
- <Serializable(), _
- System.ComponentModel.DesignerCategoryAttribute("code")> _
- Public Class DataSet1
- Inherits System.Data.DataSet
-
- Private tableAuthors As AuthorsDataTable
-
- Public Sub New()
- MyBase.New
- Me.InitClass
- End Sub
-
- Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
- MyBase.New
- Me.InitClass
- Me.GetSerializationData(info, context)
- End Sub
-
- <System.ComponentModel.Browsable(false), _
- System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property Authors As AuthorsDataTable
- Get
- Return Me.tableAuthors
- End Get
- End Property
-
- Protected Overrides Function ShouldSerializeTables() As Boolean
- Return false
- End Function
-
- Protected Overrides Function ShouldSerializeRelations() As Boolean
- Return false
- End Function
-
- Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader)
- Me.ReadXml(reader, XmlReadMode.IgnoreSchema)
- End Sub
-
- Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
- Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
- Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing))
- stream.Position = 0
- Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing)
- End Function
-
- Private Sub InitClass()
- Me.DataSetName = "DataSet1"
- Me.Namespace = "http://www.tempuri.org/DataSet1.xsd"
- Me.tableAuthors = New AuthorsDataTable
- Me.Tables.Add(Me.tableAuthors)
- End Sub
-
- Private Function ShouldSerializeAuthors() As Boolean
- Return false
- End Function
-
- Public Delegate Sub AuthorsRowChangeEventHandler(ByVal sender As Object, ByVal e As AuthorsRowChangeEvent)
-
- Public Class AuthorsDataTable
- Inherits DataTable
- Implements System.Collections.IEnumerable
-
- Private columnAu_ID As DataColumn
-
- Private columnAuthor As DataColumn
-
- Private columnYear_Born As DataColumn
-
- Friend Sub New()
- MyBase.New("Authors")
- Me.InitClass
- End Sub
-
- <System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- Friend ReadOnly Property Au_IDColumn As DataColumn
- Get
- Return Me.columnAu_ID
- End Get
- End Property
-
- Friend ReadOnly Property AuthorColumn As DataColumn
- Get
- Return Me.columnAuthor
- End Get
- End Property
-
- Friend ReadOnly Property Year_BornColumn As DataColumn
- Get
- Return Me.columnYear_Born
- End Get
- End Property
-
- Public Default ReadOnly Property Item(ByVal index As Integer) As AuthorsRow
- Get
- Return CType(Me.Rows(index),AuthorsRow)
- End Get
- End Property
-
- Public Event AuthorsRowChanged As AuthorsRowChangeEventHandler
-
- Public Event AuthorsRowChanging As AuthorsRowChangeEventHandler
-
- Public Event AuthorsRowDeleted As AuthorsRowChangeEventHandler
-
- Public Event AuthorsRowDeleting As AuthorsRowChangeEventHandler
-
- Public Overloads Sub AddAuthorsRow(ByVal row As AuthorsRow)
- Me.Rows.Add(row)
- End Sub
-
- Public Overloads Function AddAuthorsRow(ByVal Author As String, ByVal Year_Born As Short) As AuthorsRow
- Dim rowAuthorsRow As AuthorsRow = CType(Me.NewRow,AuthorsRow)
- rowAuthorsRow.ItemArray = New Object() {Nothing, Author, Year_Born}
- Me.Rows.Add(rowAuthorsRow)
- Return rowAuthorsRow
- End Function
-
- Public Function FindByAu_ID(ByVal Au_ID As Integer) As AuthorsRow
- Return CType(Me.Rows.Find(New Object() {Au_ID}),AuthorsRow)
- End Function
-
- Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
- Return Me.Rows.GetEnumerator
- End Function
-
- Private Sub InitClass()
- Me.columnAu_ID = New DataColumn("Au_ID", GetType(System.Int32), "", System.Data.MappingType.Element)
- Me.columnAu_ID.AutoIncrement = true
- Me.columnAu_ID.AllowDBNull = false
- Me.columnAu_ID.Unique = true
- Me.Columns.Add(Me.columnAu_ID)
- Me.columnAuthor = New DataColumn("Author", GetType(System.String), "", System.Data.MappingType.Element)
- Me.Columns.Add(Me.columnAuthor)
- Me.columnYear_Born = New DataColumn("Year Born", GetType(System.Int16), "", System.Data.MappingType.Element)
- Me.Columns.Add(Me.columnYear_Born)
- Me.PrimaryKey = New DataColumn() {Me.columnAu_ID}
- End Sub
-
- Public Function NewAuthorsRow() As AuthorsRow
- Return CType(Me.NewRow,AuthorsRow)
- End Function
-
- Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
- 'We need to ensure that all Rows in the tabled are typed rows.
- 'Table calls newRow whenever it needs to create a row.
- 'So the following conditions are covered by Row newRow(Record record)
- '* Cursor calls table.addRecord(record)
- '* table.addRow(object[] values) calls newRow(record)
- Return New AuthorsRow(builder)
- End Function
-
- Protected Overrides Function GetRowType() As System.Type
- Return GetType(AuthorsRow)
- End Function
-
- Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.AuthorsRowChangedEvent) Is Nothing) Then
- RaiseEvent AuthorsRowChanged(Me, New AuthorsRowChangeEvent(CType(e.Row,AuthorsRow), e.Action))
- End If
- End Sub
-
- Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.AuthorsRowChangingEvent) Is Nothing) Then
- RaiseEvent AuthorsRowChanging(Me, New AuthorsRowChangeEvent(CType(e.Row,AuthorsRow), e.Action))
- End If
- End Sub
-
- Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.AuthorsRowDeletedEvent) Is Nothing) Then
- RaiseEvent AuthorsRowDeleted(Me, New AuthorsRowChangeEvent(CType(e.Row,AuthorsRow), e.Action))
- End If
- End Sub
-
- Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.AuthorsRowDeletingEvent) Is Nothing) Then
- RaiseEvent AuthorsRowDeleting(Me, New AuthorsRowChangeEvent(CType(e.Row,AuthorsRow), e.Action))
- End If
- End Sub
-
- Public Sub RemoveAuthorsRow(ByVal row As AuthorsRow)
- Me.Rows.Remove(row)
- End Sub
- End Class
-
- Public Class AuthorsRow
- Inherits DataRow
-
- Private tableAuthors As AuthorsDataTable
-
- Friend Sub New(ByVal rb As DataRowBuilder)
- MyBase.New(rb)
- Me.tableAuthors = CType(Me.Table,AuthorsDataTable)
- End Sub
-
- Public Property Au_ID As Integer
- Get
- Return CType(Me(Me.tableAuthors.Au_IDColumn),Integer)
- End Get
- Set
- Me(Me.tableAuthors.Au_IDColumn) = value
- End Set
- End Property
-
- Public Property Author As String
- Get
- Try
- Return CType(Me(Me.tableAuthors.AuthorColumn),String)
- Catch e As InvalidCastException
- Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableAuthors.AuthorColumn) = value
- End Set
- End Property
-
- Public Property Year_Born As Short
- Get
- Try
- Return CType(Me(Me.tableAuthors.Year_BornColumn),Short)
- Catch e As InvalidCastException
- Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableAuthors.Year_BornColumn) = value
- End Set
- End Property
-
- Public Function IsAuthorNull() As Boolean
- Return Me.IsNull(Me.tableAuthors.AuthorColumn)
- End Function
-
- Public Sub SetAuthorNull()
- Me(Me.tableAuthors.AuthorColumn) = System.Convert.DBNull
- End Sub
-
- Public Function IsYear_BornNull() As Boolean
- Return Me.IsNull(Me.tableAuthors.Year_BornColumn)
- End Function
-
- Public Sub SetYear_BornNull()
- Me(Me.tableAuthors.Year_BornColumn) = System.Convert.DBNull
- End Sub
- End Class
-
- Public Class AuthorsRowChangeEvent
- Inherits EventArgs
-
- Private eventRow As AuthorsRow
-
- Private eventAction As System.Data.DataRowAction
-
- Public Sub New(ByVal row As AuthorsRow, ByVal action As DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- Public ReadOnly Property Row As AuthorsRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- Public ReadOnly Property Action As DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
- End Class
-